/*
 * GetCatAction.java
 *
 * Created on 19 de julio de 2006, 19:59
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package fmap.actions.cat;

import fmap.dao.CatDao;
import fmap.model.Cat;
import java.util.Vector;

/**
 *
 * @author javi
 */
public class GetCatsAction
{

    /** Creates a new instance of GetCatAction */
    public Cat[] GetCatsAction ()
    {
        Cat[] cats = null;

        Vector v = new CatDao().selectCats ();

        if( v.size ()>0 ) cats = new Cat[v.size ()];
        for( int i=0; i<v.size (); i++ )
        {
            Cat cat = (Cat)v.get (i);

            cats[i] = cat;
        }

        return cats;
    }
}
